]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ci: Do not create pipelines for branches with open MRs
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 30 Jan 2024 16:27:32 +0000 (17:27 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 30 Jan 2024 17:15:33 +0000 (17:15 +0000)
Pipelines for non-protected branches are set to 'manual', and
thus cheap. However they may still get picked by `@marge-bot`,
meaning that the bot waits for the completion of a pipeline that
never starts.

Avoid that by not creating pipelines for branches with open
merge requests.

Credit to Jordan, who came up with this for gst.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3153>

.gitlab-ci.yml

index 8d881ba7fc2723f0a5f2766030525c394172e8b6..bebbf7e50fa585497a48ce3e1ca89c9a4f76848f 100644 (file)
@@ -35,6 +35,8 @@ variables:
 
 workflow:
   rules:
+    - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"'
+      when: never
     - if: '$CI_MERGE_REQUEST_IID'
     - if: '$CI_COMMIT_TAG'
     - if: '$CI_COMMIT_BRANCH'